#include<iostream>
#include<string>
#include<unordered_map>
using namespace std;
string s, t;
int main()
{
	while (getline(cin, s)) {
		if (s == "\n")break;
		getline(cin, t);
		unordered_map<string, int>mp;
		int len1 = s.size();
		for (int i = 0; i < len1; ) {
			if (s[i] == '\"') {
				int pos = s.find("\"", i + 1); 
				string temp = s.substr(i + 1, pos - i - 1);
				//cout << "temp==" << temp << endl;
				mp[temp] = 1;
				i = pos + 2;
			}
			else {
				int pos = s.find(",", i + 1);
				if (pos == -1) {
					string temp = s.substr(i);
					mp[temp] = 1;
					break;
				}
				else {
					string temp = s.substr(i, pos - i);
					mp[temp] = 1;
					i = pos + 1;
				}
			}
		}
		if (mp[t])cout << "Ignore" << endl;
		else cout << "Important!" << endl;
	}
	return 0;
}